'use strict';

const Controller = require('egg').Controller;

class FeedbackController extends Controller {

  async create(ctx) {
    const body = ctx.request.body;
    // 储存新主题帖
    const userId = ctx.getUserId();
    const content = body.content;
    const res = await ctx.service.feedback.newFeedback(userId, content);
    ctx.body = {
      success: true,
      result: res
    };
  }
}

module.exports = FeedbackController;

